package com.xiyoufang.club.repository;

import com.xiyoufang.club.entity.ClubCsReceiveHistory;
import com.xiyoufang.club.entity.ClubOperatorRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public abstract interface ClubCsReceiveHistoryRepository
        extends JpaRepository<ClubCsReceiveHistory, Integer> {
    @Query(nativeQuery = true, value = "SELECT * FROM club_receive_history t WHERE t.club_id=:clubId AND  t.user_id=:userId ORDER BY create_time DESC")
    public abstract List<ClubOperatorRecord> findClubReceiveByClubIdAndUserId(@Param("clubId") int paramInt1, @Param("userId") int paramInt2);
}
